package com.ruoyi.fun.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 部署记录对象 sys_deployment_log
 * 
 * @author Dreamyy
 * @date 2025-09-10
 */
public class SysDeploymentLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 部门ID */
    @Excel(name = "部门ID")
    private Long deptId;

    /** 用户配置表单ID */
    @Excel(name = "用户配置表单ID")
    private String configId;

    /** 部署版本号 */
    @Excel(name = "部署版本号")
    private String versionNumber;

    /** 部署状态 */
    @Excel(name = "部署状态")
    private String deploymentStatus;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 部署耗时（秒） */
    @Excel(name = "部署耗时", readConverterExp = "秒=")
    private Long duration;

    /** 错误信息 */
    @Excel(name = "错误信息")
    private String errorMessage;

    /** 性能影响说明 */
    @Excel(name = "性能影响说明")
    private String performanceImpact;

    /** 备份信息 */
    @Excel(name = "备份信息")
    private String backupInfo;

    /** 审批人 */
    @Excel(name = "审批人")
    private String approver;

    /** 审批时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approvalTime;

    /** 审批备注 */
    @Excel(name = "审批备注")
    private String approvalNotes;

    /** 部门名称 */
    private String deptName;

    /** 用户名称 */
    private String userName;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }

    public void setConfigId(String configId) 
    {
        this.configId = configId;
    }

    public String getConfigId() 
    {
        return configId;
    }

    public void setVersionNumber(String versionNumber) 
    {
        this.versionNumber = versionNumber;
    }

    public String getVersionNumber() 
    {
        return versionNumber;
    }

    public void setDeploymentStatus(String deploymentStatus) 
    {
        this.deploymentStatus = deploymentStatus;
    }

    public String getDeploymentStatus() 
    {
        return deploymentStatus;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setDuration(Long duration) 
    {
        this.duration = duration;
    }

    public Long getDuration() 
    {
        return duration;
    }

    public void setErrorMessage(String errorMessage) 
    {
        this.errorMessage = errorMessage;
    }

    public String getErrorMessage() 
    {
        return errorMessage;
    }

    public void setPerformanceImpact(String performanceImpact) 
    {
        this.performanceImpact = performanceImpact;
    }

    public String getPerformanceImpact() 
    {
        return performanceImpact;
    }

    public void setBackupInfo(String backupInfo) 
    {
        this.backupInfo = backupInfo;
    }

    public String getBackupInfo() 
    {
        return backupInfo;
    }

    public void setApprover(String approver) 
    {
        this.approver = approver;
    }

    public String getApprover() 
    {
        return approver;
    }

    public void setApprovalTime(Date approvalTime) 
    {
        this.approvalTime = approvalTime;
    }

    public Date getApprovalTime() 
    {
        return approvalTime;
    }

    public void setApprovalNotes(String approvalNotes) 
    {
        this.approvalNotes = approvalNotes;
    }

    public String getApprovalNotes() 
    {
        return approvalNotes;
    }

    public void setDeptName(String deptName) 
    {
        this.deptName = deptName;
    }

    public String getDeptName() 
    {
        return deptName;
    }

    public void setUserName(String userName) 
    {
        this.userName = userName;
    }

    public String getUserName() 
    {
        return userName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("deptId", getDeptId())
            .append("configId", getConfigId())
            .append("versionNumber", getVersionNumber())
            .append("deploymentStatus", getDeploymentStatus())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("duration", getDuration())
            .append("errorMessage", getErrorMessage())
            .append("performanceImpact", getPerformanceImpact())
            .append("backupInfo", getBackupInfo())
            .append("approver", getApprover())
            .append("approvalTime", getApprovalTime())
            .append("approvalNotes", getApprovalNotes())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
